package com.rpframework.module.common.bottom.controller;

import com.rpframework.core.json.JsonResp;
import com.rpframework.module.common.bottom.entity.Jurisdiction;
import com.rpframework.module.common.url.RequestDescription;
import com.rpframework.module.common.url.explain.RequestDescriptionExplain;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping
@ResponseBody
@RequestDescription("后台管理菜单")
public class MenuController {

    private List<Jurisdiction> list;


    public MenuController(String[] packages) {
        list = new RequestDescriptionExplain(packages).getUrlAll();
    }

    @RequestMapping
    @RequestDescription("所有列表")
    public JsonResp list() {
        return JsonResp.list(list);
    }
}
